package com.mk.common.util;

import org.junit.Test;

import com.mk.car.entity.Car;

public class ObjCloneDemo {
	
	@Test
	public void test1() {
		Car car = new Car();
		car.setCarno("苏B·AD829");
		car.setId(12);
		
		Car cloneCar;
		cloneCar = car;
		
		cloneCar.setCarno("苏C·NU800");
	
		//输出
		/**
		 * 克隆对象的修改连带 原对象也被改了
		 */
		System.out.println(car);
		System.out.println(cloneCar);
	}
	
	
	@Test
	public void test2() {
		System.out.println(1/2*9);
		Object obj = new Object();
	}
	
}
